﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace HZ.Supervise.IBLL
{
    public interface IBLL_PreWarning
    {
        /// <summary>
        /// 获取医院列表
        /// </summary>
        /// <param name="hospitalname">医院名</param>
        /// <param name="areaid">地区编号(多地区,隔开)</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">页面大小</param>
        /// <param name="totalrecord">记录总数</param>
        /// <returns>医院列表</returns>
        DataTable GetHospital(string hospitalname, string areaid, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取企业列表
        /// </summary>
        /// <param name="companyname"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetCompany(string companyname, int currentpage, int pagesize, out int totalrecord);


        
        /// <summary>
		/// 获取企业详细信息
		/// </summary>
		/// <param name="companyname"></param>
		/// <param name="currentpage"></param>
		/// <param name="pagesize"></param>
		/// <param name="totalrecord"></param>
		/// <returns></returns>
        DataTable GetCompanyInfo(HZ.Supervise.Model.Company com, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 获取中心机构列表
        /// </summary>
        /// <param name="companyname"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetManageOrg(string manageOrgName, int currentpage, int pagesize, out int totalrecord);
        #region 状态预警
        /// <summary>
        /// 增加一个预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int AddDrugPreWarning(Model.DrugPreWarning drugprewarning);

        /// <summary>
        /// 修改预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int UpdateDrugPreWarning(Model.DrugPreWarning drugprewarning);
        /// <summary>
        /// 删除预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int DeleteDrugPreWarning(Model.DrugPreWarning drugprewarning);
        /// <summary>
        /// 获取药品预警列表
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetDrugPreWarning(Model.DrugPreWarning drugprewarning, int currentpage, int pagesize, out int totalrecord);
        #endregion



        #region 采购预警

        /// <summary>
        /// 增加一个采购预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int AddTradePreWarning(Model.TradePreWarning tradeprewarning);

        /// <summary>
        /// 修改预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int UpdateTradePreWarning(Model.TradePreWarning tradeprewarning);
        /// <summary>
        /// 删除预警
        /// </summary>
        /// <param name="drugprewarning"></param>
        /// <returns></returns>
        int DeleteTradePreWarning(Model.TradePreWarning tradeprewarning);

        /// <summary>
        /// 获取药品预警列表
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetTradePreWarning(HZ.Supervise.Model.TradePreWarning tradeprewarning, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 获取需处理预警药品列表
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetDrugPreWarning_CL(HZ.Supervise.Model.DrugPreWarning drugprewarning, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 获取需处理预警交易列表
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetTradePreWarning_CL(HZ.Supervise.Model.TradePreWarning tradeprewarning, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 获取预警数据
        /// </summary>
        /// <param name="warningData"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetWarningData(HZ.Supervise.Model.WarningData warningData, int currentpage, int pagesize, out int totalrecord);
        #endregion

        /// <summary>
        /// 装载预警数据
        /// </summary>
        void Insert_WarningData();

        /// <summary>
        /// 验证采购预警是否重复
        /// </summary>
        /// <param name="drug"></param>
        /// <returns></returns>
        bool DrugCheckDataSource(HZ.Supervise.Model.DrugPreWarning drug);

        /// <summary>
        /// 交易过程预警监测
        /// </summary>
        /// <param name="tran"></param>
        /// <returns></returns>
        bool TranCheckDataSource(HZ.Supervise.Model.TradePreWarning tran);

        /// <summary>
        /// 医院列表
        /// </summary>
        /// <param name="HospitalID"></param>
        /// <param name="AreaID"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalName(string HospitalID, string AreaID, int currentpage, int pagesize, out int totalrecord);
        DataTable GetHospitalName(string Hospitalidorname, int currentpage, int pagesize, out int totalrecord);
        //System.Data.DataTable GetHospitalName_Type(string HospitalIDorname, string HospitalType, string aid,int currentpage, int pagesize, out int totalrecord);
        System.Data.DataTable GetHospitalName_Type(string HospitalIDorname, string aid, int currentpage, int pagesize, out int totalrecord);

         /// <summary>
        /// 获取医院级别
        /// </summary>
        /// <returns></returns>
        System.Data.DataTable GetHospitalType();
        /// <summary>
        /// 获得参加采购医院的数量
        /// </summary>
        /// <returns>采购医院的数量</returns>
        int GetHospitalCount();
        /// <summary>
        /// 获得参加采购药品的数量
        /// </summary>
        /// <returns>采购药品的数量</returns>
        int GetGoodsCount();
        /// <summary>
        /// 企业列表
        /// </summary>
        /// <param name="companyid"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetCompanyName(string companyid, int currentpage, int pagesize, out int totalrecord);
        DataTable GetCompanyName(string companyidname, string companyid, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 将企业添加到黑名单
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        int InsertIntoBlackList(HZ.Supervise.Model.BlackList blackList);
        /// <summary>
        /// 将投诉添加到投诉表
        /// </summary>
        /// <param name="complain">投诉实体</param>
        /// <returns>0失败 1成功</returns>
        int InsertIntoComplain(HZ.Supervise.Model.Complain complain);
        /// <summary>
        /// 获取企业详细信息
        /// </summary>
        /// <param name="companyname"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetCompanyInfo(string companyname, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 获取不在黑名单中的企业
        /// </summary>
        /// <param name="companyname">企业名称</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页最大数</param>
        /// <param name="totalrecord"></param>
        /// <returns>不在黑名单中的企业</returns>
        DataTable GetCompanyNotInBlackList(string companyname, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获得黑名单中的企业
        /// </summary>
        /// <param name="companyname">企业名称</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页显示的数目</param>
        /// <param name="totalrecord"></param>
        /// <returns>黑名单中的企业</returns>
        DataTable GetBlackList(string companyname, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 获得投诉表中的投诉信息
        /// </summary>
        /// <param name="complain">投诉实体</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页最大数</param>
        /// <param name="totalrecord"></param>
        /// <returns>投诉信息</returns>
        DataTable GetComplain(HZ.Supervise.Model.Complain complain, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获得医院
        /// </summary>
        /// <param name="complain"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospital(HZ.Supervise.Model.Hospital Hospital, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 回复投诉
        /// </summary>
        /// <param name="complain"></param>
        /// <returns></returns>
        int ReplyComplain(HZ.Supervise.Model.Complain complain);

        #region 获取预警地图
        /// <summary>
        /// 获取预警区域
        /// </summary>
        /// <returns></returns>
        DataTable GetWarningArea();

        #endregion
    }
}
